import request from '../index';
// 登录接口
export const getLogin = (params) =>{
    return request({
        url:'/api/token',
        method:'post',
        data:params
    })
}

// 管理员查询接口
export const getAdminSer = (token,params) =>{
    return request({
        url:'/api/adminuser',
        method:'get',
        params,
        headers: { token }
    })
}
// 管理员添加接口
export const getAdminAdd = (params) =>{
    return request({
        url:'/api/adminuser',
        method:'post',
        data:params
    })
}
// 管理员编辑接口
export const getAdminEdit = (params) =>{
    return request({
        url:`/api/adminuser/${params.id}`,
        method:'put',
        data:params
    })
}
// 管理员删除接口
export const getAdminDel = (params) =>{
    return request({
        url:`/api/adminuser/${params}`,
        method:'delete',
        data:params
    })
}
